package com.jhgsys.internal.incentive.entity;


import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import com.fasterxml.jackson.annotation.JsonFormat;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;


/**
 * 奖励条款规则 Entity
 *
 * @author zjb
 * @date 2024-08-30 09:51:15
 */
@Data
@TableName("incentive_reward_clause_rule")
public class IncentiveRewardClauseRule implements Serializable {

    /**
     * 主键
     */
    @TableId(value = "clause_rule_id", type = IdType.ASSIGN_UUID)
    @Size(max = 32, message = "{noMoreThan}")
    private String clauseRuleId;

    /**
     * 公司ID
     */
    @TableField("tenant_id")
    @NotBlank(message = "{required}")
    @Size(max = 32, message = "{noMoreThan}")
    private String tenantId;

    /**
     * 违章条款Id
     */
    @TableField("clause_id")
    @NotBlank(message = "{required}")
    @Size(max = 32, message = "{noMoreThan}")
    private String clauseId;

    /**
     * 条款号
     */
    @TableField("clause_no")
    @NotBlank(message = "{required}")
    @Size(max = 64, message = "{noMoreThan}")
    private String clauseNo;

    /**
     * 条款等级
     */
    @TableField("clause_level")
    @NotNull(message = "{required}")
    private Integer clauseLevel;
    /**
     * 奖励金额
     */
    @TableField("reference_money")
    @NotNull(message = "{required}")
    private BigDecimal referenceMoney;

    /**
     * 奖励分数
     */
    @TableField("examine_score")
    private Integer examineScore;

    /**
     * 条款内容
     */
    @TableField("clause_content")
    @NotBlank(message = "{required}")
    @Size(max = 800, message = "{noMoreThan}")
    private String clauseContent;

    /**
     * 执行时间
     */
    @TableField("execute_date")
    @NotNull(message = "{required}")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern="yyyy-MM-dd",timezone = "GMT+8")
    private Date executeDate;

    /**
     * 有效状态;0:失效； 1：有效
     */
    @TableField("status")
    @NotBlank(message = "{required}")
    @Size(max = 1, message = "{noMoreThan}")
    private String status;

    /**
     * 新增人
     */
    @TableField("created_by")
    @Size(max = 32, message = "{noMoreThan}")
    private String createdBy;

    /**
     * 新增时间
     */
    @TableField("created_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date createdTime;

    /**
     * 修改人
     */
    @TableField("updated_by")
    @Size(max = 32, message = "{noMoreThan}")
    private String updatedBy;

    /**
     * 修改时间
     */
    @TableField("updated_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date updatedTime;

    /**
     * 删除人
     */
    @TableField("deleted_by")
    @Size(max = 32, message = "{noMoreThan}")
    private String deletedBy;

    /**
     * 删除时间
     */
    @TableField("deleted_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date deletedTime;

    /**
     * 删除标记
     */
    @TableField("deleted_flg")
    @Size(max = 1, message = "{noMoreThan}")
    private String deletedFlg;

    /**
     * 是否需要插入记录表标记
     */
    @TableField(exist = false)
    private Boolean insertFlg = true;

}